home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Belgian Amiga Club - ADF Collection
/
BS1 part 26.zip
/
BS1 part 26
/
The Director Toolkit v1.0.adf
/
CLI_Commands
/
MakePal
/
docs
< prev
next >
Wrap
Text File
|
1987-02-25
|
4KB
|
106 lines
|c7|t1|f2MakePal - Palette Optimizer|c3|t0|f1|r1
|c7MakePal|c3 is a program you run from the |c7CLI|c3 that will take
one or more
|c7IFF|c3 image files, and attempt to select a best-fit palette of a number
of colors specified by you that can be used as a common palette or a
reduced palette.|r1
|e
There are a number of possible uses for |c7MakePal|c3|-. For example,
you can take several |c7HAM|c3 images and run |c7MakePal|c3 on them
to produce a |c732|c3 color or |c764|c3 color |c7halfbright|c3 palette
that can be used as a common palette
for all of the |c7HAM|c3 images. Many Director effects are optimal
when the palettes of all the images involved are the same.|r1
Or, you might use |c7MakePal|c3 to pick a |c724|c3 color palette for a
single |c732|c3 color image, reducing the palette in order to free up
some colors for added effects.|r1
|e
To use |c7MakePal|c3|-, read the section on |c7CLI|c3 commands in
the Description notes, and then from the |c7CLI|c3|-, type:|r1
|+8|c71> makepal -16 listfile palfile|c3|r1
Where |c7"16"|c3 is the size of the palette you wish to generate,
|c7"listfile"|c3 is
the name of a list file containing a list of the images to use in choosing
a palette, and |c7"palfile"|c3 is the name of the output palette file.|r1
|e
A list file is simply a text file (like a Director script file) list of
file names, something like this:|r1
|+8|c7df1:pictures/house|r1
|+8df1:pictures/figure|r1
|+8df1:pictures/illus1|c3|r1
Use |c7ED|c3 or your favorite text editor to create the list file.|r1
|e
If you want to make a |c7halfbright|c3 palette, use |c764|c3 as the
size of the palette:|r1
|+8|c71> makepal -64 ram:list ram:pal|c7|r1
When |c7MakePal|c3 runs, it will display each file in turn, and scan
across the
image examining all the pixels. After the last file is scanned,
|c7MakePal|c3
will exit and output a coded dump of the palette generated, and will have
created the specified palette output file. The palette output file is a
single pixel brush file with included palette. You can load this into
|c7DPaint II|c3 and use the |c7"Use Brush Palette"|c3 option, or load it
into |c7PixMate|c3 or |c7Digi-View|c3 with a |c7"Load Palette"|c3|-.|r1
|e
|c7MakePal|c3 is particularly useful with |c7Digi-View|c3|-. You can
actually decide to save the images when digitized in both |c7HAM|c3
and |c7RGB|c3 modes, run several |c7HAM|c3
images through |c7MakePal|c3 generating a |c764|c3 or |c732|c3 color
palette, and then return
to |c7Digi-View|c3|-, load the new palette, select |c7"Freeze Palette"|c3
in the palette
menu, and load each of the |c7RGB|c3 images in turn and display with the
desired
number of colors. By then saving these images out you will have a series
of images with a common palette. The |c732|c3 color images used in the
Wipe demo
were produced in this manner, using only |c72|c3 of them to pick the
best palette
between the two favored images, and forcing the rest of the images to use
the resulting palette.|r1
|e
|c7MakePal|c3 works by building a histogram of all the pixels of all
the images
and picking an optimum palette from all of them. |c7MakePal|c3 will
then work
with varying amounts of success, depending on several factors. Generally,
the more images you run through |c7MakePal|c3|-, the less effective
the resultant
palette will be for any given image, even if it results in ostensibly the
|c7"best"|c3 fit palette over the entire set of images. As previously
indicated,
sometimes doing a palette pick over only a few images (usually the ones
you want to look best) and then simply forcing any other images to
use that palette can be an effective technique.|r1
|e
|c7MakePal|c3 may not always produce useful results, you can generally count
on the palette for any particular image to be at least a little less
optimum than the original palette for the image, and when converting
|c7HAM|c3 to |c732|c3 or fewer colors, this too can lessen the quality
of the resulting image. You will have to experiment with it and see
just how it may be useful.|r1
DPaint II is a trademark of Electronic Arts.|r1
Digi-View is a trademark of NewTek.|r1
PixMate is a trademark of Progressive Peripherals and Software, Inc. |r1